<template>
	<view style="width: 100vw;height: 100vh;" class="bg-gradual-orange cf pos-r">
		<cu-custom bgColor="bg-gradual-orange" :isBack="true">
			<block slot="backText">返回</block>
			<block slot="content">闪达物流·安全快速</block>
		</cu-custom>
		<view class="fs50 tac padt10">
			VIP
		</view>
		<view class="tac">
			<text class=" fa fa-bookmark"></text>
			<text class="padlr3">会员升级特权</text>
			<text class=" fa fa-bookmark"></text>
		</view>
		<view class="mar5 bcaf9 round3 pad5 text-red fs14 lh2 tac">
			<view>监督保证货物安全</view>
			<view>每车反50元运费</view>
			<view>无限次发车</view>
			<view>可开具发票</view>
			<view>GPS全程跟踪</view>
		</view>
		<view class="tac fs8 cf op7">会员期限为开通之日起一年（365天）时间</view>
		<view class="pos-a b0 l0 r0 pad10">
			<view class=" bg-yellow round30 cf pad3 tac fs14 ripple" @tap="charge">
				￥1200 开通会员
			</view>
		</view>
		
	</view>
</template>

<script>
	import api from '../../../static/js/api.js'
	import com from '../../../static/js/com.js'
	import win from '../../../static/js/win.js'
	export default {
		data() {
			return {
				
			}
		},
		methods: {
			charge(){
				let _this = this
				api.get("/api/wuliuPay/create",{},function(res){
					console.log(res)
					res = res.d
					uni.requestPayment({
					    provider: 'wxpay',
					    timeStamp: res.timeStamp,
					    nonceStr: res.nonceStr,
					    package: res.package,
					    signType: 'MD5',
					    paySign: res.paySign,
					    success: function (res) {
					        // console.log('success:' + JSON.stringify(res));
							uni.showToast({
							    title: '支付成功',
								icon: 'none',
							    duration: 2000
							});
							_this.$win.goback()
					    },
					    fail: function (err) {
					        console.log('fail:' + JSON.stringify(err));
							uni.showToast({
							    title: '支付失败',
								icon: 'none',
							    duration: 2000
							});
					    }
					});
				})
			}
		}
	}
</script>

<style>

</style>
